package com.lagou.edu.utils;

import com.lagou.edu.annotation.Component;

import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.reflect.AnnotatedType;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.*;
import java.util.stream.Collectors;

public class Test {

    public static void main(String[] args) throws ClassNotFoundException {



    }

    private static String getBeanName(Class<?> aClass) {
        String beanName = aClass.getSimpleName();
        if (aClass.getSimpleName().charAt(0) < 'Z'){
            beanName = (char) (aClass.getSimpleName().charAt(0) + 32) +aClass.getSimpleName().substring(1);
        }
        return beanName;
    }


    private static List<String> getFiles(File file){
        if (Objects.isNull(file)){
            return new ArrayList<>();
        }
        List<String> result = new ArrayList<>();
        if (file.isDirectory()){
            File[] files = file.listFiles();
            if (Objects.nonNull(files)){
                for (File file1 : files) {
                    result.addAll(getFiles(file1));
                }
            }
        }else {
            if (file.getName().endsWith(".class")){
                result.add(file.getPath());
            }
        }
        return result;
    }
}
